package homework;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Test1 {
    public static void main(String[] args) {
        File file = new File("demo.sf");
        try (FileInputStream fis = new FileInputStream(file)){
            byte[] bytes = new byte[(int) file.length()];
            fis.read(bytes);
            String line = new String(bytes, StandardCharsets.UTF_8);
            System.out.println(line);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
